WARNING: This program has a bug, which means we need to fix it! This bug is a logic error.

RULE: The third if-statement in this program is indented inside the previous if-statement, and will only be checked if the second if-statement is true. If we want each if-statement to be checked, it must NOT be indented!

  • Click Run until choice is equal to 3 and watch the stage to see what's wrong.
  • Debug this program so that when 3 is selected, the shark appears.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)